<template>
    <div v-if="ac.infor.adminId">
      <h1>用户列表</h1>
      <table class="table table-bordered">
        <tbody>
          <tr>
            <td>姓名</td>
            <td>账号</td>
            <td>密码</td>
            <td>手机韩</td>
          </tr>
          <tr v-for="item in list">
            <td>{{item.adminName}}</td>
            <td>{{item.acnumber}}</td>
            <td>{{ '****' }}</td>
            <td>{{item.phone.substring(0,3)+'****'+item.phone.substring(7)}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <div v-else>您还没有登录</div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref,reactive,onMounted } from 'vue';
import { useRoute,useRouter } from 'vue-router';
const router=useRouter();
const route=useRoute();

import {useCounterStore} from '@/stores/use'
const ac=useCounterStore();


let list:any=ref([])

onMounted(()=>{
  showlist();
})

const showlist=()=>
{
  axios
  ({
    url:'/api/Organ/ShowAdmin',
    method:'get'
  })
  .then(res=>{
    list.value=res.data;
  })
  .catch(err=>{

  })
}


</script>

<style scoped>

</style>